Skip to content

fix(teamfolder): Check teamfolder versions against the original file - #1287

Merged
hweihwang merged 1 commit into
mainfrom
fix/teamfolder-versions
Dec 3, 2026
Merged

hweihwang merged 1 commit into
mainfrom
fix/teamfolder-versions

Conversation

@benjaminfrueh

Copy link
Copy Markdown
Contributor

Problem

Team folder versions are stored as <fileId>/<timestamp>, without the file name. Operation::translatePath() did not map this path to the original file, so the version was denied. The old version is lost without any message. This also happens for shared team folder files.

Reproduction

  • Create a team folder
  • Create a flow "Block access to a file" that only allows folders and text/plain
  • Upload a .txt file to the team folder and overwrite it
  • The versions tab shows only the current version. The log shows Access denied by access control from VersionsBackend::createVersion

Fix

Map a new version to the original file by its file ID in the same storage.
Added an integration test to cover it.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@hweihwang hweihwang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @benjaminfrueh! I could reproduce the lost version on main, and with the mimetype rule it's kept now. A rule on tags still drops it in team folders though, see inline.

Comment thread lib/Operation.php Resolved

@hweihwang hweihwang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @benjaminfrueh! Tested again and the old version is kept with the tag rule now, restoring it works fine too. Also good catch on moving a file out of the team folder, that was lost on main for me and it's kept now. Old style team folders, shares and S3 look good as well 👍

Comment thread lib/Operation.php Resolved
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
@benjaminfrueh
benjaminfrueh force-pushed the fix/teamfolder-versions branch from 680bc4a to 4095dc0 Compare December 3, 2026 09:09
@hweihwang
hweihwang merged commit e1d7ff0 into main Dec 3, 2026
38 checks passed
@hweihwang
hweihwang deleted the fix/teamfolder-versions branch December 3, 2026 10:48
@hweihwang

Copy link
Copy Markdown
Contributor

/backport to stable35

@hweihwang

Copy link
Copy Markdown
Contributor

/backport to stable34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants